The present invention relates to image processing, and more particularly, to an image processing method facilitating replacement of the background of an image with a new background.
Background replacement is an image processing method commonly used in professional production of images, video, and motion pictures. Background replacement generally comprises the steps of segmenting the elements of the foreground and background of an image followed by substituting pixels of a new background for the pixels of the image's original background. Blue screening or chroma keying is a background replacement process commonly used by professional movie, video, and televison studios. In the blue screening process, the foreground elements of an image are captured in front of a screen of a uniform color, usually blue. During editing, the blue pixels are identified as background pixels and replaced with spatially corresponding pixels from a replacement background. While blue screening or chroma key replacement is commonly used in motion picture and television production, the process is not well suited to amateur or non-studio image and video production. For the technique to work properly, the pixels of the background screen must be a uniform color so that they will be correctly identified. Therefore, the foreground elements of the image must be filmed in a studio under carefully controlled lighting conditions. In addition, the color of the background screen must be significantly different from the color of pixels of the foreground elements of the image. Any “blue” pixels of a foreground element will be identified as background and replaced.
To avoid the cost and limitations of the blue screening process, techniques have been developed to perform background replacement without the necessity of a blue screen. Generally, these processes utilize either a global-based or a pixel-based method to segment the foreground and background elements of the image. A global-based method typically classifies image elements as foreground or background on the basis of models of typical foreground or background elements. However, accurate classification of foreground and background elements with these methods is limited by the difficulty of modeling complex objects in the feature space (typically, a color space) in which the segmentation process operates.
Pixel-based methods classify each pixel of the image as either a background or foreground pixel by comparing the pixel to its spatially corresponding counterpart in a separately recorded image that includes only the background. For example, Korn, U.S. Pat. No. 5,781,198, METHOD AND APPARATUS FOR REPLACING A BACKGROUND PORTION OF AN IMAGE, discloses a pixel-based background replacement technique. Two images of a scene are captured. A first or input image includes both the foreground elements and the background. A second image includes only the background. The pixels of the images are sampled and stored. A copy of both images is low-pass filtered to create blurred versions of the images. Spatially corresponding pixels from the two filtered images are compared. If pixels of a spatially corresponding pair are similar, the pixel from the input image is assumed to be from the background. However, if the pixels of a pair are sufficiently different, the pixel from the input image is classified as a foreground pixel. A binary image mask is created to indicate the membership of each pixel of the input image in either the pixels of the foreground or the background. Utilizing the image mask, spatially corresponding pixels of a new background image are substituted for the pixels of the original background of the input image.
While pixel-based techniques generally provide more accurate image segmentation than global replacement techniques, accurate pixel-based segmentation requires consistency between the background pixels of the input image and the pixels of the background reference image. If a pair of spatially corresponding pixels from the two images varies significantly, the pixel at that location will be classified as a foreground pixel. However, the values of pixels of sequential images of the same scene can vary substantially due to extraneous influences. For example, noise originating in the charge-coupled device (CCD) of the camera can produce random variations in the values of the spatially corresponding pixels of two images of a sequence. In highly textured areas of an image, such as an area capturing an image of the leaves of a plant, the values of adjacent pixels can vary substantially. Even slight movement of the camera or a minor change in surface lighting can cause significant differences in the values of spatially corresponding pixels of textured areas of sequential images. In addition, small object motion, such as movement of the leaves of a plant, will substantially reduce the accuracy of pixel-based image segmentation. As a result, pixel-based background replacement for video is generally limited to video sequences of indoor scenes having a stationary, low texture background that is captured with high quality video equipment.
What is desired, therefore, is an image background replacement system that provides accurate image segmentation, can be produced with readily available equipment, and is tolerant of noise and motion of small objects in the image background.